// 顶部悬浮
// 
var topFloat = document.querySelector(".xuanfu")
var left_asd = document.querySelector('.left_asd')
var right_asd = document.querySelector('.right_asd')
// console.log(left_asd);
// console.log(right_asd);
window.onscroll = function(){
    // 获取滚动过的距离
    var t = document.documentElement.scrollTop || document.body.scrollTop;
    // 如果滚动了30px的时候就应该显示top了
    if(t >= 30){
        // 设置topFloat的高度为30
        topFloat.style.transition = 'all 1s'
        // topFloat.style.height = '30px' 
        topFloat.style.display = 'block'
        topFloat.style.backgroundColor = '#fff'

    }
    else {
        // console.log(t);
        if(t === 0){
            topFloat.style.display = 'none'
        }
        topFloat.style.transition = 'none'
    }
}





var container = document.querySelector(".container");
    var ulis = document.querySelectorAll(".container >ul li ");
    var olis = document.querySelectorAll(".container ol li ");
    var leftBtn = document.querySelector(".container>a.left");
    var rightBtn = document.querySelector(".container>a.right");
    var index = 0
    // //右箭头点击
    rightBtn.onclick = function () {
      right();
      return false;
    };
    leftBtn.onclick = function () {
      //让下标自减
      index--;
      if (index < 0) {
        index = ulis.length - 1;
      }
      //将所有ul下的li类名去掉
      move();
      return false;
    };
    //小圆点点击
    for (let i = 0; i < olis.length; i++) {
      olis[i].onclick = function () {
        index = i;
        move();
      };
    }
    //右箭头点击
    function right() {
      //让下标自增
      index++;
      if (index >= ulis.length) {
        index = 0;
      }
      //将所有ul下的li类名去掉
      move();
    }
    //轮播图核心代码
    function move() {
      for (var i = 0; i < ulis.length; i++) {
        ulis[i].className = "";
        olis[i].className = "";
      }
      //给当前下标对应的li添加active类名
      ulis[index].className = "active";
      olis[index].className = "active";
    }
    //自动轮播
    var timer = setInterval(function () {
      right();
    }, 3000);
    //移入移出
    container.onmouseover = function () {
      clearInterval(timer);
      leftBtn.style.display = "block";
      rightBtn.style.display = "block";
    };
    container.onmouseout = function () {
      timer = setInterval(function () {
        right(); 
      }, 3000);
      leftBtn.style.display = "none";
      rightBtn.style.display = "none";
    };

    //左侧分类列表
    $('.list ul li').mouseover(function(){
        var index = $(this).index()
        $('.list .data .right_data:eq('+ index +')').show().siblings().hide()
        $('.list .data .right_data .left_fenlei:eq('+ index +')').show().text($(this).text())
        // $('.list .data .right_data .right_pic:eq('+ index +')').show().text($(this).text())
    })
    $('.list ul li').mouseout(function(){
        $('.list .data .right_data').hide()
    }) 


    // ajax
    $.ajax({
      url:'https://pages.kaola.com/pages/region/advance/b8b317bd55374be4bcf49f76e9d52c69.html?',
      dataType:'jsonp',
      data:{
        type: 2,
        uuid:'30055240467684384e75198bc034cba54e20a7b1e7169c141943',
        pageType: 0,
      },
      success:res=>{
        // console.log(res);
        var data1 = res.data[2].businessObj.content.configData
        // console.log(data1);
        var str = ''
        for(var i=1;i<5;i++){ 
          str += `<li><a>
            <h3>${data1['activityTitle' + i]}<h3>
              <p>${data1['activityTitle' + i]}<p>
              <img src="${data1['activityImage' + i]}">
       </li>` 
      // str += "<li><h3>"+data1.activityTitle+i+"</h3></li>"
      }
      $('.content .center:nth-child(2) .cen_pic ul').html(str)
      var str2 = `<img src="${data1.floorImage}">` 
      str2 +='<ul>'
      for(var j=1;j<7;j++){ 
          str2 += `<li><a>${data1['secondCategory' + j]}</a></li>` 
      // str += "<li><h3>"+data1.activityTitle+i+"</h3></li>"
      }
      str2 +='</ul>'
      $('.content .center:nth-child(2) .left_pic').html(str2)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg1']}">` 
      $('.content .center:nth-child(2) .hot .pic>div:nth-child(1)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg2']}">` 
      $('.content .center:nth-child(2) .hot .pic>div:nth-child(2)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg3']}">` 
      $('.content .center:nth-child(2) .hot .pic>div:nth-child(3)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg4']}">` 
      $('.content .center:nth-child(2) .hot .pic>div:nth-child(4)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg5']}">` 
      $('.content .center:nth-child(2) .hot .pic>div:nth-child(5)').html(str3)

      var data,datas;
      datas =  data = res.data[2].businessObj.content.composeData
      // console.log(datas); 
       var str4 = ''
          str4 += `
            <img src="${datas[0].imageUrl}">
            ` 
      $('.content .center:nth-child(2) .prolist .item>div:nth-child(1) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datas[1].imageUrl}">
            ` 
      $('.content .center:nth-child(2) .prolist .item>div:nth-child(2) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datas[2].imageUrl}">
            ` 
      $('.content .center:nth-child(2) .prolist .item>div:nth-child(3) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datas[3].imageUrl}">
            ` 
      $('.content .center:nth-child(2) .prolist .item>div:nth-child(4) .pic').html(str4)

      var a=''
      var str5 = ''
      for(var i=0;i<datas.length;i++){ 
          str5 = `<span>${datas[i].title}</span>` 
          // console.log(str5);
            var a= $('.q1').eq(i)
            a.html(str5)  
            // a.innerHTML =str5
              // console.log( a.html(str5) );
      }







      var data1 = res.data[2].businessObj.content.configData
        // console.log(data1);
        var str = ''
        for(var i=1;i<5;i++){ 
          str += `<li><a>
            <h3>${data1['activityTitle' + i]}<h3>
              <p>${data1['activityTitle' + i]}<p>
              <img src="${data1['activityImage' + i]}">
       </li>` 
      // str += "<li><h3>"+data1.activityTitle+i+"</h3></li>"
      }
      $('.content .center:nth-child(3) .cen_pic ul').html(str)
      var str2 = `<img src="${data1.floorImage}">` 
      str2 +='<ul>'
      for(var j=1;j<7;j++){ 
          str2 += `<li><a>${data1['secondCategory' + j]}</a></li>` 
      // str += "<li><h3>"+data1.activityTitle+i+"</h3></li>"
      }
      str2 +='</ul>'
      $('.content .center:nth-child(3) .left_pic').html(str2)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg1']}">` 
      $('.content .center:nth-child(3) .hot .pic>div:nth-child(1)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg2']}">` 
      $('.content .center:nth-child(3) .hot .pic>div:nth-child(2)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg3']}">` 
      $('.content .center:nth-child(3) .hot .pic>div:nth-child(3)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg4']}">` 
      $('.content .center:nth-child(3) .hot .pic>div:nth-child(4)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg5']}">` 
      $('.content .center:nth-child(3) .hot .pic>div:nth-child(5)').html(str3)


      var dataas =  data = res.data[2].businessObj.content.composeData
      // console.log(dataas); 
       var str4 = ''
          str4 += `
            <img src="${dataas[4].imageUrl}">
            ` 
      $('.content .center:nth-child(3) .prolist .item>div:nth-child(1) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${dataas[5].imageUrl}">
            ` 
      $('.content .center:nth-child(3) .prolist .item>div:nth-child(2) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${dataas[6].imageUrl}">
            ` 
      $('.content .center:nth-child(3) .prolist .item>div:nth-child(3) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${dataas[7].imageUrl}">
            ` 
      $('.content .center:nth-child(3) .prolist .item>div:nth-child(4) .pic').html(str4)

      var a=''
      var str5 = ''
      for(var i=0;i<4;i++){ 
          str5 = `<span>${datas[i].title}</span>` 
          // console.log(str5);
            var a= $('.q1').eq(i)
            a.html(str5)  
            // a.innerHTML =str5
              // console.log( a.html(str5) );
      }













      var data11 = res.data[5].businessObj.content.configData
        // console.log(data11);
        var str = ''
        for(var i=1;i<5;i++){ 
          str += `<li><a>
            <h3>${data11['activityTitle' + i]}<h3>
              <p>${data11['activityTitle' + i]}<p>
              <img src="${data11['activityImage' + i]}">
       </li>` 
      // str += "<li><h3>"+data11.activityTitle+i+"</h3></li>"
      }
      $('.content .center:nth-child(4) .cen_pic ul').html(str)
      var str2 = `<img src="${data11.floorImage}">` 
      str2 +='<ul>'
      for(var j=1;j<7;j++){ 
          str2 += `<li><a>${data11['secondCategory' + j]}</a></li>` 
      // str += "<li><h3>"+data11.activityTitle+i+"</h3></li>"
      }
      str2 +='</ul>'
      $('.content .center:nth-child(4) .left_pic').html(str2)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg1']}">` 
      $('.content .center:nth-child(4) .hot .pic>div:nth-child(1)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg2']}">` 
      $('.content .center:nth-child(4) .hot .pic>div:nth-child(2)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg3']}">` 
      $('.content .center:nth-child(4) .hot .pic>div:nth-child(3)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg4']}">` 
      $('.content .center:nth-child(4) .hot .pic>div:nth-child(4)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg5']}">` 
      $('.content .center:nth-child(4) .hot .pic>div:nth-child(5)').html(str3)


      var datass =  data = res.data[5].businessObj.content.composeData
      // console.log(datass); 
       var str4 = ''
          str4 += `
            <img src="${datass[0].imageUrl}">
            ` 
      $('.content .center:nth-child(4) .prolist .item>div:nth-child(1) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datass[1].imageUrl}">
            ` 
      $('.content .center:nth-child(4) .prolist .item>div:nth-child(2) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datass[2].imageUrl}">
            ` 
      $('.content .center:nth-child(4) .prolist .item>div:nth-child(3) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datass[3].imageUrl}">
            ` 
      $('.content .center:nth-child(4) .prolist .item>div:nth-child(4) .pic').html(str4)

      var a=''
      var str5 = ''
      // console.log(datass.length);
     for(var i=0;i<4;i++){ 
          str5 = `<span>${datass[i].title}</span>` 
          // console.log(str5);
            var a= $('.q1').eq(i+8)
            a.html(str5)  
            // a.innerHTML =str5
          // console.log( a.html(str5));
          // console.log( $('.q1').eq(i+8));
          
      }









      var data11 = res.data[6].businessObj.content.configData
        // console.log(data11);
        var str = ''
        for(var i=1;i<5;i++){ 
          str += `<li><a>
            <h3>${data11['activityTitle' + i]}<h3>
              <p>${data11['activityTitle' + i]}<p>
              <img src="${data11['activityImage' + i]}">
       </li>` 
      // str += "<li><h3>"+data11.activityTitle+i+"</h3></li>"
      }
      $('.content .center:nth-child(5) .cen_pic ul').html(str)
      var str2 = `<img src="${data11.floorImage}">` 
      str2 +='<ul>'
      for(var j=1;j<7;j++){ 
          str2 += `<li><a>${data11['secondCategory' + j]}</a></li>` 
      // str += "<li><h3>"+data11.activityTitle+i+"</h3></li>"
      }
      str2 +='</ul>'
      $('.content .center:nth-child(5) .left_pic').html(str2)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg1']}">` 
      $('.content .center:nth-child(5) .hot .pic>div:nth-child(1)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg2']}">` 
      $('.content .center:nth-child(5) .hot .pic>div:nth-child(2)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg3']}">` 
      $('.content .center:nth-child(5) .hot .pic>div:nth-child(3)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg4']}">` 
      $('.content .center:nth-child(5) .hot .pic>div:nth-child(4)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg5']}">` 
      $('.content .center:nth-child(5) .hot .pic>div:nth-child(5)').html(str3)


      var datasss =  data = res.data[6].businessObj.content.composeData
      // console.log(datasss); 
       var str4 = ''
          str4 += `
            <img src="${datasss[0].imageUrl}">
            ` 
      $('.content .center:nth-child(5) .prolist .item>div:nth-child(1) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datasss[1].imageUrl}">
            ` 
      $('.content .center:nth-child(5) .prolist .item>div:nth-child(2) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datasss[2].imageUrl}">
            ` 
      $('.content .center:nth-child(5) .prolist .item>div:nth-child(3) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datasss[3].imageUrl}">
            ` 
      $('.content .center:nth-child(5) .prolist .item>div:nth-child(4) .pic').html(str4)

      var a=''
      var str5 = ''
      // console.log(datasss.length);
     for(var i=0;i<4;i++){ 
          str5 = `<span>${datasss[i].title}</span>` 
          // console.log(str5);
            var a= $('.q1').eq(i+12)
            a.html(str5)  
            // a.innerHTML =str5
          // console.log( a.html(str5) );
          // console.log( $('.q1').eq(i+12) );
          
      }

      var a=''
      var str5 = ''
     for(var i=0;i<datas.length;i++){ 
          str5 = `
          <span style="color:#f00;font-size:18px">￥${datas[i].actualCurrentPrice}</span>
          <span style="color:#999;font-size:12px;text-decoration:line-through">￥${datas[i].marketPrice}</span>
          ` 
          // console.log(str5);
            var a= $('.q2').eq(i)
            a.html(str5)  
            // a.innerHTML =str5
          // console.log( a.html(str5) );
          // console.log(datas);
      } 




     






      var data11 = res.data[5].businessObj.content.configData
        // console.log(data11);
        var str = ''
        for(var i=1;i<5;i++){ 
          str += `<li><a>
            <h3>${data11['activityTitle' + i]}<h3>
              <p>${data11['activityTitle' + i]}<p>
              <img src="${data11['activityImage' + i]}">
       </li>` 
      // str += "<li><h3>"+data11.activityTitle+i+"</h3></li>"
      }
      $('.content .center:nth-child(6) .cen_pic ul').html(str)
      var str2 = `<img src="${data11.floorImage}">` 
      str2 +='<ul>'
      for(var j=1;j<7;j++){ 
          str2 += `<li><a>${data11['secondCategory' + j]}</a></li>` 
      // str += "<li><h3>"+data11.activityTitle+i+"</h3></li>"
      }
      str2 +='</ul>'
      $('.content .center:nth-child(6) .left_pic').html(str2)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg1']}">` 
      $('.content .center:nth-child(6) .hot .pic>div:nth-child(1)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg2']}">` 
      $('.content .center:nth-child(6) .hot .pic>div:nth-child(2)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg3']}">` 
      $('.content .center:nth-child(6) .hot .pic>div:nth-child(3)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg4']}">` 
      $('.content .center:nth-child(6) .hot .pic>div:nth-child(4)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg5']}">` 
      $('.content .center:nth-child(6) .hot .pic>div:nth-child(5)').html(str3)


      var datass =  data = res.data[5].businessObj.content.composeData
      // console.log(datass); 
       var str4 = ''
          str4 += `
            <img src="${datass[0].imageUrl}">
            ` 
      $('.content .center:nth-child(6) .prolist .item>div:nth-child(1) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datass[1].imageUrl}">
            ` 
      $('.content .center:nth-child(6) .prolist .item>div:nth-child(2) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datass[2].imageUrl}">
            ` 
      $('.content .center:nth-child(6) .prolist .item>div:nth-child(3) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datass[3].imageUrl}">
            ` 
      $('.content .center:nth-child(6) .prolist .item>div:nth-child(4) .pic').html(str4)

      var a=''
      var str5 = ''
      // console.log(datasss.length);
     for(var i=0;i<4;i++){ 
          str5 = `<span>${datass[i].title}</span>` 
          // console.log(str5);
            var a= $('.q1').eq(i+16)
            a.html(str5)  
            // a.innerHTML =str5
          // console.log( a.html(str5) );
          // console.log( $('.q1').eq(i+12) );
          
      }





      var data11 = res.data[6].businessObj.content.configData
        // console.log(data11);
        var str = ''
        for(var i=1;i<5;i++){ 
          str += `<li><a>
            <h3>${data11['activityTitle' + i]}<h3>
              <p>${data11['activityTitle' + i]}<p>
              <img src="${data11['activityImage' + i]}">
       </li>` 
      // str += "<li><h3>"+data11.activityTitle+i+"</h3></li>"
      }
      $('.content .center:nth-child(7) .cen_pic ul').html(str)
      var str2 = `<img src="${data11.floorImage}">` 
      str2 +='<ul>'
      for(var j=1;j<7;j++){ 
          str2 += `<li><a>${data11['secondCategory' + j]}</a></li>` 
      // str += "<li><h3>"+data11.activityTitle+i+"</h3></li>"
      }
      str2 +='</ul>'
      $('.content .center:nth-child(7) .left_pic').html(str2)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg1']}">` 
      $('.content .center:nth-child(7) .hot .pic>div:nth-child(1)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg2']}">` 
      $('.content .center:nth-child(7) .hot .pic>div:nth-child(2)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg3']}">` 
      $('.content .center:nth-child(7) .hot .pic>div:nth-child(3)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg4']}">` 
      $('.content .center:nth-child(7) .hot .pic>div:nth-child(4)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg5']}">` 
      $('.content .center:nth-child(7) .hot .pic>div:nth-child(5)').html(str3)


      var datasss =  data = res.data[6].businessObj.content.composeData
      // console.log(datasss); 
       var str4 = ''
          str4 += `
            <img src="${datasss[0].imageUrl}">
            ` 
      $('.content .center:nth-child(7) .prolist .item>div:nth-child(1) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datasss[1].imageUrl}">
            ` 
      $('.content .center:nth-child(7) .prolist .item>div:nth-child(2) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datasss[2].imageUrl}">
            ` 
      $('.content .center:nth-child(7) .prolist .item>div:nth-child(3) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datasss[3].imageUrl}">
            ` 
      $('.content .center:nth-child(7) .prolist .item>div:nth-child(4) .pic').html(str4)

      var a=''
      var str5 = ''
      // console.log(datasss.length);
     for(var i=0;i<4;i++){ 
          str5 = `<span>${datasss[i].title}</span>` 
          // console.log(str5);
            var a= $('.q1').eq(i+20)
            a.html(str5)  
            // a.innerHTML =str5
          // console.log( a.html(str5) );
          // console.log( $('.q1').eq(i+20));
          
      }

      var a=''
      var str5 = ''
     for(var i=0;i<datas.length;i++){ 
          str5 = `
          <span style="color:#f00;font-size:18px">￥${datas[i].actualCurrentPrice}</span>
          <span style="color:#999;font-size:12px;text-decoration:line-through">￥${datas[i].marketPrice}</span>
          ` 
          // console.log(str5);
            var a= $('.q2').eq(i)
            a.html(str5)  
            // a.innerHTML =str5
          // console.log( a.html(str5) );
          // console.log(datas);
      } 









      var data1 = res.data[2].businessObj.content.configData
        // console.log(data1);
        var str = ''
        for(var i=1;i<5;i++){ 
          str += `<li><a>
            <h3>${data1['activityTitle' + i]}<h3>
              <p>${data1['activityTitle' + i]}<p>
              <img src="${data1['activityImage' + i]}">
       </li>` 
      // str += "<li><h3>"+data1.activityTitle+i+"</h3></li>"
      }
      $('.content .center:nth-child(8) .cen_pic ul').html(str)
      var str2 = `<img src="${data1.floorImage}">` 
      str2 +='<ul>'
      for(var j=1;j<7;j++){ 
          str2 += `<li><a>${data1['secondCategory' + j]}</a></li>` 
      // str += "<li><h3>"+data1.activityTitle+i+"</h3></li>"
      }
      str2 +='</ul>'
      $('.content .center:nth-child(8) .left_pic').html(str2)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg1']}">` 
      $('.content .center:nth-child(8) .hot .pic>div:nth-child(1)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg2']}">` 
      $('.content .center:nth-child(8) .hot .pic>div:nth-child(2)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg3']}">` 
      $('.content .center:nth-child(8) .hot .pic>div:nth-child(3)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg4']}">` 
      $('.content .center:nth-child(8) .hot .pic>div:nth-child(4)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg5']}">` 
      $('.content .center:nth-child(8) .hot .pic>div:nth-child(5)').html(str3)


      var dataas =  data = res.data[2].businessObj.content.composeData
      // console.log(dataas); 
       var str4 = ''
          str4 += `
            <img src="${dataas[4].imageUrl}">
            ` 
      $('.content .center:nth-child(8) .prolist .item>div:nth-child(1) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${dataas[5].imageUrl}">
            ` 
      $('.content .center:nth-child(8) .prolist .item>div:nth-child(2) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${dataas[6].imageUrl}">
            ` 
      $('.content .center:nth-child(8) .prolist .item>div:nth-child(3) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${dataas[7].imageUrl}">
            ` 
      $('.content .center:nth-child(8) .prolist .item>div:nth-child(4) .pic').html(str4)

      var a=''
      var str5 = ''
      for(var i=4;i<8;i++){ 
          str5 = `<span>${dataas[i].title}</span>` 
          // console.log(str5);
            var a= $('.q1').eq(i+20)
            a.html(str5)  
            // a.innerHTML =str5
              // console.log( a.html(str5) );
              // console.log($('.q1').eq(i+20));
      }









      var data11 = res.data[6].businessObj.content.configData
        // console.log(data11);
        var str = ''
        for(var i=1;i<5;i++){ 
          str += `<li><a>
            <h3>${data11['activityTitle' + i]}<h3>
              <p>${data11['activityTitle' + i]}<p>
              <img src="${data11['activityImage' + i]}">
       </li>` 
      // str += "<li><h3>"+data11.activityTitle+i+"</h3></li>"
      }
      $('.content .center:nth-child(9) .cen_pic ul').html(str)
      var str2 = `<img src="${data11.floorImage}">` 
      str2 +='<ul>'
      for(var j=1;j<7;j++){ 
          str2 += `<li><a>${data11['secondCategory' + j]}</a></li>` 
      // str += "<li><h3>"+data11.activityTitle+i+"</h3></li>"
      }
      str2 +='</ul>'
      $('.content .center:nth-child(9) .left_pic').html(str2)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg1']}">
              <i class="iconfont icon-aixin"></i>
              ` 
      $('.content .center:nth-child(9) .hot .pic>div:nth-child(1)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg2']}">
              <i class="iconfont icon-aixin"></i>
              ` 
      $('.content .center:nth-child(9) .hot .pic>div:nth-child(2)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg3']}">
              <i class="iconfont icon-aixin"></i>
              ` 
      $('.content .center:nth-child(9) .hot .pic>div:nth-child(3)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg4']}">
              <i class="iconfont icon-aixin"></i>
              ` 
      $('.content .center:nth-child(9) .hot .pic>div:nth-child(4)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg5']}">
              <i class="iconfont icon-aixin"></i>
              ` 
      $('.content .center:nth-child(9) .hot .pic>div:nth-child(5)').html(str3)


      var datasss =  data = res.data[6].businessObj.content.composeData
      // console.log(datasss); 
       var str4 = ''
          str4 += `
            <img src="${datasss[0].imageUrl}">
            ` 
      $('.content .center:nth-child(9) .prolist .item>div:nth-child(1) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datasss[1].imageUrl}">
            ` 
      $('.content .center:nth-child(9) .prolist .item>div:nth-child(2) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datasss[2].imageUrl}">
            ` 
      $('.content .center:nth-child(9) .prolist .item>div:nth-child(3) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datasss[3].imageUrl}">
            ` 
      $('.content .center:nth-child(9) .prolist .item>div:nth-child(4) .pic').html(str4)

      var a=''
      var str5 = ''
      // console.log(datasss.length);
     for(var i=0;i<4;i++){ 
          str5 = `<span>${datasss[i].title}</span>` 
          // console.log(str5);
            var a= $('.q1').eq(i+28)
            a.html(str5)  
            // a.innerHTML =str5
          // console.log( a.html(str5) );
          // console.log( $('.q1').eq(i+12) );
          
      }

      var a=''
      var str5 = ''
     for(var i=0;i<datas.length;i++){ 
          str5 = `
          <span style="color:#f00;font-size:18px">￥${datas[i].actualCurrentPrice}</span>
          <span style="color:#999;font-size:12px;text-decoration:line-through">￥${datas[i].marketPrice}</span>
          ` 
          // console.log(str5);
            var a= $('.q2').eq(i)
            a.html(str5)  
            // a.innerHTML =str5
          // console.log( a.html(str5) );
          // console.log(datas);
      } 






      var data11 = res.data[5].businessObj.content.configData
        // console.log(data11);
        var str = ''
        for(var i=1;i<5;i++){ 
          str += `<li><a>
            <h3>${data11['activityTitle' + i]}<h3>
              <p>${data11['activityTitle' + i]}<p>
              <img src="${data11['activityImage' + i]}">
       </li>` 
      // str += "<li><h3>"+data11.activityTitle+i+"</h3></li>"
      }
      $('.content .center:nth-child(10) .cen_pic ul').html(str)
      var str2 = `<img src="${data11.floorImage}">` 
      str2 +='<ul>'
      for(var j=1;j<7;j++){ 
          str2 += `<li><a>${data11['secondCategory' + j]}</a></li>` 
      // str += "<li><h3>"+data11.activityTitle+i+"</h3></li>"
      }
      str2 +='</ul>'
      $('.content .center:nth-child(10) .left_pic').html(str2)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg1']}">` 
      $('.content .center:nth-child(10) .hot .pic>div:nth-child(1)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg2']}">` 
      $('.content .center:nth-child(10) .hot .pic>div:nth-child(2)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg3']}">` 
      $('.content .center:nth-child(10) .hot .pic>div:nth-child(3)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg4']}">` 
      $('.content .center:nth-child(10) .hot .pic>div:nth-child(4)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg5']}">` 
      $('.content .center:nth-child(10) .hot .pic>div:nth-child(5)').html(str3)


      var datass =  data = res.data[5].businessObj.content.composeData
      // console.log(datass); 
       var str4 = ''
          str4 += `
            <img src="${datass[0].imageUrl}">
            ` 
      $('.content .center:nth-child(10) .prolist .item>div:nth-child(1) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datass[1].imageUrl}">
            ` 
      $('.content .center:nth-child(10) .prolist .item>div:nth-child(2) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datass[2].imageUrl}">
            ` 
      $('.content .center:nth-child(10) .prolist .item>div:nth-child(3) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datass[3].imageUrl}">
            ` 
      $('.content .center:nth-child(10) .prolist .item>div:nth-child(4) .pic').html(str4)

      var a=''
      var str5 = ''
      // console.log(datasss.length);
     for(var i=0;i<4;i++){ 
          str5 = `<span>${datass[i].title}</span>` 
          // console.log(str5);
            var a= $('.q1').eq(i+32)
            a.html(str5)  
            // a.innerHTML =str5
          // console.log( a.html(str5) );
          // console.log( $('.q1').eq(i+12) );
          
      }







      var data1 = res.data[2].businessObj.content.configData
        // console.log(data1);
        var str = ''
        for(var i=1;i<5;i++){ 
          str += `<li><a>
            <h3>${data1['activityTitle' + i]}<h3>
              <p>${data1['activityTitle' + i]}<p>
              <img src="${data1['activityImage' + i]}">
       </li>` 
      // str += "<li><h3>"+data1.activityTitle+i+"</h3></li>"
      }
      $('.content .center:nth-child(11) .cen_pic ul').html(str)
      var str2 = `<img src="${data1.floorImage}">` 
      str2 +='<ul>'
      for(var j=1;j<7;j++){ 
          str2 += `<li><a>${data1['secondCategory' + j]}</a></li>` 
      // str += "<li><h3>"+data1.activityTitle+i+"</h3></li>"
      }
      str2 +='</ul>'
      $('.content .center:nth-child(11) .left_pic').html(str2)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg1']}">` 
      $('.content .center:nth-child(11) .hot .pic>div:nth-child(1)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg2']}">` 
      $('.content .center:nth-child(11) .hot .pic>div:nth-child(2)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg3']}">` 
      $('.content .center:nth-child(11) .hot .pic>div:nth-child(3)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg4']}">` 
      $('.content .center:nth-child(11) .hot .pic>div:nth-child(4)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data1['hotSaleBrandImg5']}">` 
      $('.content .center:nth-child(11) .hot .pic>div:nth-child(5)').html(str3)


      var dataas =  data = res.data[2].businessObj.content.composeData
      // console.log(dataas); 
       var str4 = ''
          str4 += `
            <img src="${dataas[4].imageUrl}">
            ` 
      $('.content .center:nth-child(11) .prolist .item>div:nth-child(1) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${dataas[5].imageUrl}">
            ` 
      $('.content .center:nth-child(11) .prolist .item>div:nth-child(2) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${dataas[6].imageUrl}">
            ` 
      $('.content .center:nth-child(11) .prolist .item>div:nth-child(3) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${dataas[7].imageUrl}">
            ` 
      $('.content .center:nth-child(11) .prolist .item>div:nth-child(4) .pic').html(str4)

      var a=''
      var str5 = ''
      for(var i=4;i<8;i++){ 
          str5 = `<span>${dataas[i].title}</span>` 
          // console.log(str5);
            var a= $('.q1').eq(i+32)    
            a.html(str5)  
            // a.innerHTML =str5
              // console.log( a.html(str5) );
              // console.log($('.q1').eq(i+32));
      }




      var data11 = res.data[5].businessObj.content.configData
        // console.log(data11);
        var str = ''
        for(var i=1;i<5;i++){ 
          str += `<li><a>
            <h3>${data11['activityTitle' + i]}<h3>
              <p>${data11['activityTitle' + i]}<p>
              <img src="${data11['activityImage' + i]}">
       </li>` 
      // str += "<li><h3>"+data11.activityTitle+i+"</h3></li>"
      }
      $('.content .center:nth-child(12) .cen_pic ul').html(str)
      var str2 = `<img src="${data11.floorImage}">` 
      str2 +='<ul>'
      for(var j=1;j<7;j++){ 
          str2 += `<li><a>${data11['secondCategory' + j]}</a></li>` 
      // str += "<li><h3>"+data11.activityTitle+i+"</h3></li>"
      }
      str2 +='</ul>'
      $('.content .center:nth-child(12) .left_pic').html(str2)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg1']}">` 
      $('.content .center:nth-child(12) .hot .pic>div:nth-child(1)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg2']}">` 
      $('.content .center:nth-child(12) .hot .pic>div:nth-child(2)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg3']}">` 
      $('.content .center:nth-child(12) .hot .pic>div:nth-child(3)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg4']}">` 
      $('.content .center:nth-child(12) .hot .pic>div:nth-child(4)').html(str3)
      var str3 = ''
          str3 += `
              <img src="${data11['hotSaleBrandImg5']}">` 
      $('.content .center:nth-child(12) .hot .pic>div:nth-child(5)').html(str3)


      var datass =  data = res.data[5].businessObj.content.composeData
      // console.log(datass); 
       var str4 = ''
          str4 += `
            <img src="${datass[0].imageUrl}">
            ` 
      $('.content .center:nth-child(12) .prolist .item>div:nth-child(1) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datass[1].imageUrl}">
            ` 
      $('.content .center:nth-child(12) .prolist .item>div:nth-child(2) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datass[2].imageUrl}">
            ` 
      $('.content .center:nth-child(12) .prolist .item>div:nth-child(3) .pic').html(str4)
      var str4 = ''
          str4 += `
            <img src="${datass[3].imageUrl}">
            ` 
      $('.content .center:nth-child(12) .prolist .item>div:nth-child(4) .pic').html(str4)

      var a=''
      var str5 = ''
      // console.log(datasss.length);
     for(var i=0;i<4;i++){ 
          str5 = `<span>${datass[i].title}</span>` 
          // console.log(str5);
            var a= $('.q1').eq(i+40)
            a.html(str5)  
            // a.innerHTML =str5
          // console.log( a.html(str5) );
          // console.log( $('.q1').eq(i+12) ); 
      }
      }
    })
var str9 = '' 
$('.pic').on('mouseover',function(){
  str9+=`<i class='iconfont icon-aixin'></i>`
    $('.pic div').append(str9)
})
dl()
function dl(){
  var tel = localStorage.getItem('tel')
var denglu = $('.header .center .left ul .denglu')
var zhuce = $('.header .center .left ul .zhuce')
var str1 = ''
var str2 = ''
if(!tel){
  str1 += `
  <a href="./regeister.html">免费注册</a>
  `
  str2+=`
  <a href="./login.html">登录</a>
  `
  denglu.html(str2)
  zhuce.html(str1)
}else{
  str1+=`
  <span style="color:yellow">
  欢迎用户${tel}回来
  </span>
  `
  str2+=`
  <a onclick='fn()'>退出</a>
  `
  denglu.html(str1)
  zhuce.html(str2)
}
}
function fn(){
  localStorage.setItem('url',location.href)
  layer.confirm('您确定要退出吗？',{
    btn:['确定','取消']
},()=>{
  layer.msg('退出成功，请重新登录',{
    icon:1,
    time:1000
  })
})
  localStorage.removeItem('tel')
  dl()
}